package com.blb.service.impl;

import com.blb.entity.Product;
import com.blb.entity.Sort;
import com.blb.mapper.ProductMapper;
import com.blb.service.IProductService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author wss
 * @since 2020-05-22
 */
@Service
public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> implements IProductService {

    @Resource
    private ProductMapper productMapper;

    @Override
    public int addProduct(Product product) {
        return productMapper.addProduct(product);
    }


    @Override
    public Product productById(String id, String companyId) {
        return productMapper.productById(id, companyId);
    }

    @Override
    public Product productByNameOrType(String productName, String productType, String companyId) {
        return productMapper.productByNameOrType(productName, productType, companyId);
    }

    @Override
    public List<Product> getProductList(Integer start, Integer length, String productName, Integer status, String companyId) {
        return productMapper.getProductList(start, length, productName, status, companyId);
    }

    @Override
    public int getProductCount(String productName, Integer status, String companyId) {
        return productMapper.getProductCount(productName, status, companyId);
    }

    @Override
    public List<Sort> getSort(String companyId) {
        return productMapper.getSort(companyId);
    }

    @Override
    public List<Sort> getSorts(String sortId, String companyId) {
        return productMapper.getSorts(sortId, companyId);
    }

    @Override
    public List<Sort> getSortss(String sortId, String companyId) {
        return productMapper.getSortss(sortId, companyId);
    }

    @Override
    public Product productByIds(String id, String companyId) {
        return productMapper.productByIds(id, companyId);
    }

    @Override
    public int productStates1(String id, String companyId) {
        return productMapper.productStates1(id, companyId);
    }

    @Override
    public int productStates2(String id, String companyId) {
        return productMapper.productStates2(id, companyId);
    }

    @Override
    public int examineStates1(String id, String companyId) {
        return productMapper.examineStates1(id, companyId);
    }

    @Override
    public int examineStates2(String id, String companyId) {
        return productMapper.examineStates2(id, companyId);
    }

    @Override
    public int states1(String companyId) {
        return productMapper.states1(companyId);
    }

    @Override
    public int states2(String companyId) {
        return productMapper.states2(companyId);
    }

    @Override
    public int states3(String companyId) {
        return productMapper.states3(companyId);
    }

    @Override
    public int productByIdss(String id) {
        return productMapper.productByIdss(id);
    }
}
